<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增父类章节')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-section-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">父章节名字：</label>
            <div class="col-sm-8">
                <input class="form-control" name="fatherSectionName" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">父章节备注：</label>
            <div class="col-sm-8">
                <input class="form-control" name="fatherSectionText" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">父章节关联课：</label>
            <div class="col-sm-8">
                <select class="form-control m-b" name="sectionCourseId">
                    <option th:each="name:${listName}" th:text="${name.courseName}"
                            th:value="${name.courseName}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "tianliangedu/section"
    $("#form-section-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-section-add').serialize());
        }
    }
</script>
</body>
</html>